<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.linenumber {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='linenumber'>  1</span> <span class="COMM">/*
<span class='linenumber'>  2</span> 
<span class='linenumber'>  3</span> */</span><span class="WHIT">
<span class='linenumber'>  4</span> 
<span class='linenumber'>  5</span> 
<span class='linenumber'>  6</span> </span><span class="COMM">//Namespace 2112</span><span class="WHIT">
<span class='linenumber'>  7</span> </span><span class="NAME">window.NS2112</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.NS2112</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>  8</span> 
<span class='linenumber'>  9</span> 
<span class='linenumber'> 10</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">selftest</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'> 11</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 12</span>    </span><span class="NAME">alert</span><span class="PUNC">(</span><span class="STRN">"NS2112.snapInLoader"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 13</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 14</span> </span><span class="WHIT">
<span class='linenumber'> 15</span> 
<span class='linenumber'> 16</span> 
<span class='linenumber'> 17</span> 
<span class='linenumber'> 18</span> </span><span class="NAME">NS2112.namespace</span><span class="PUNC">(</span><span class="STRN">"NS2112.snapInLoaderGlobals"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 19</span> </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//array</span><span class="WHIT">
<span class='linenumber'> 20</span> </span><span class="NAME">NS2112.snapInLoaderGlobals.URI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'> 21</span> 
<span class='linenumber'> 22</span> 
<span class='linenumber'> 23</span> 
<span class='linenumber'> 24</span> </span><span class="NAME">fnError</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 25</span> 
<span class='linenumber'> 26</span> </span><span class="WHIT"> </span><span class="NAME">alert</span><span class="PUNC">(</span><span class="STRN">"AJAX calling error"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 27</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 28</span> 
<span class='linenumber'> 29</span> </span><span class="NAME">NS2112.snapInLoaderGlobals.onDataReady</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">NS2112.CustomEvent</span><span class="PUNC">(</span><span class="STRN">"onDataReady"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 30</span> 
<span class='linenumber'> 31</span> </span><span class="NAME">NS2112.snapInLoaderGlobals.cbLoadNext</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'> 32</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 33</span> </span><span class="WHIT">   </span><span class="NAME">NS2112.snapInLoaderGlobals.onDataReady.fire</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 34</span> </span><span class="WHIT">   </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'> 35</span> </span><span class="WHIT">   </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 36</span> </span><span class="WHIT">      </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">uri</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.URI</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'SNAPINURL='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">URL</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 37</span> </span><span class="WHIT">      </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns.splice</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">  </span><span class="COMM">//kick the array</span><span class="WHIT">
<span class='linenumber'> 38</span> </span><span class="WHIT">      </span><span class="NAME">NS2112.snapInLoaderGlobals.makeRequest</span><span class="PUNC">(</span><span class="NAME">uri</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.myXHRCallback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">        </span><span class="WHIT">
<span class='linenumber'> 39</span> </span><span class="WHIT">   </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 40</span> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'> 41</span> 
<span class='linenumber'> 42</span> </span><span class="NAME">NS2112.snapInLoaderGlobals.myXHRCallback</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">response</span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'> 43</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 44</span> </span><span class="COMM">//alert("myXHRCallback " + http_request_snap.readyState) ;</span><span class="WHIT">
<span class='linenumber'> 45</span> </span><span class="WHIT">      </span><span class="WHIT">
<span class='linenumber'> 46</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">http_request_snap.readyState</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">http_request_snap.status</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">200</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'> 47</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 48</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 49</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 50</span> 
<span class='linenumber'> 51</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT">
<span class='linenumber'> 52</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">         </span><span class="WHIT">
<span class='linenumber'> 53</span> </span><span class="WHIT">      </span><span class="COMM">//todo -> do some checking before eval.</span><span class="WHIT">
<span class='linenumber'> 54</span> </span><span class="WHIT">		</span><span class="NAME">eval</span><span class="PUNC">(</span><span class="NAME">http_request_snap.responseText</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 55</span> </span><span class="WHIT">      </span><span class="NAME">NS2112.snapInLoaderGlobals.cbLoadNext</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='linenumber'> 56</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 57</span> </span><span class="WHIT">	</span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'> 58</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 59</span> </span><span class="WHIT">		</span><span class="COMM">//alert('snapInLoaderGlobals.myXHRCallback [' + e + ']') ;</span><span class="WHIT">
<span class='linenumber'> 60</span> </span><span class="WHIT">   </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 61</span> </span><span class="PUNC">}</span><span class="WHIT">  </span><span class="WHIT">
<span class='linenumber'> 62</span> 
<span class='linenumber'> 63</span> 
<span class='linenumber'> 64</span> 
<span class='linenumber'> 65</span> </span><span class="NAME">NS2112.snapInLoaderGlobals.makeRequest</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">url</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bCallAsync</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">fnCallback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'> 66</span> </span><span class="WHIT">   </span><span class="PUNC">{</span><span class="WHIT">		</span><span class="WHIT">
<span class='linenumber'> 67</span> </span><span class="WHIT">	       </span><span class="COMM">//alert('Calling ' + url) ;</span><span class="WHIT">
<span class='linenumber'> 68</span> </span><span class="WHIT">       </span><span class="NAME">http_request_snap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 69</span> </span><span class="WHIT">       </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">window.XMLHttpRequest</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// Mozilla, Safari,...</span><span class="WHIT">
<span class='linenumber'> 70</span> </span><span class="WHIT">           </span><span class="NAME">http_request_snap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">XMLHttpRequest</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">        </span><span class="WHIT">
<span class='linenumber'> 71</span> </span><span class="WHIT">       </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">window.ActiveXObject</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// IE</span><span class="WHIT">
<span class='linenumber'> 72</span> </span><span class="WHIT">           </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 73</span> </span><span class="WHIT">               </span><span class="NAME">http_request_snap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 74</span> </span><span class="WHIT">           </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 75</span> </span><span class="WHIT">               </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 76</span> </span><span class="WHIT">               </span><span class="NAME">http_request_snap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Microsoft.XMLHTTP"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 77</span> </span><span class="WHIT">               </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 78</span> </span><span class="WHIT">           </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 79</span> </span><span class="WHIT">       </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 80</span> </span><span class="WHIT">	   </span><span class="WHIT">
<span class='linenumber'> 81</span> </span><span class="WHIT">       </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">http_request_snap</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'> 82</span> </span><span class="WHIT">	    </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 83</span> </span><span class="WHIT">           </span><span class="COMM">//alert('Giving up :( Cannot create an XMLHTTP instance');</span><span class="WHIT">
<span class='linenumber'> 84</span> </span><span class="WHIT">           </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 85</span> </span><span class="WHIT">       </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 86</span> </span><span class="WHIT">	    </span><span class="WHIT">
<span class='linenumber'> 87</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">bCallAsync</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'> 88</span> </span><span class="WHIT">       </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'> 89</span> </span><span class="WHIT">          </span><span class="COMM">//http_request_snap.onerror = fnError ;       </span><span class="WHIT">
<span class='linenumber'> 90</span> </span><span class="WHIT">	       </span><span class="NAME">http_request_snap.onreadystatechange</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">fnCallback</span><span class="PUNC">;</span><span class="WHIT">    </span><span class="WHIT">
<span class='linenumber'> 91</span> </span><span class="WHIT">             </span><span class="WHIT">
<span class='linenumber'> 92</span> </span><span class="WHIT">       </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'> 93</span> </span><span class="WHIT">       </span><span class="NAME">http_request_snap.open</span><span class="PUNC">(</span><span class="STRN">'GET'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">url</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bCallAsync</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 94</span> </span><span class="WHIT">       </span><span class="NAME">http_request_snap.send</span><span class="PUNC">(</span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'> 95</span> 
<span class='linenumber'> 96</span> 
<span class='linenumber'> 97</span> </span><span class="WHIT">      </span><span class="WHIT">
<span class='linenumber'> 98</span> 
<span class='linenumber'> 99</span> 
<span class='linenumber'>100</span> </span><span class="WHIT">       </span><span class="WHIT">
<span class='linenumber'>101</span> </span><span class="WHIT">      </span><span class="COMM">//alert(bCallAsync  + "#########" + url) ;</span><span class="WHIT">
<span class='linenumber'>102</span> </span><span class="WHIT">       </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">bCallAsync</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'>103</span> </span><span class="WHIT">       </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'>104</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">strResponse</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">http_request_snap.responseText</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>105</span> </span><span class="WHIT">         </span><span class="COMM">//alert(url + "##########" + strResponse.length) ;   </span><span class="WHIT">
<span class='linenumber'>106</span> </span><span class="WHIT">         </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">strResponse</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>107</span> </span><span class="WHIT">       </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'>108</span> 
<span class='linenumber'>109</span> 
<span class='linenumber'>110</span> </span><span class="WHIT">   </span><span class="COMM">/* !!!!!  Da manche Webserver evt. Whitespaces am Anfang schicken, 
<span class='linenumber'>111</span>       M�ssen diese unbedingt entfernt werden! Sonst funktioniert der Parser nicht.
<span class='linenumber'>112</span>    */</span><span class="WHIT">		 </span><span class="WHIT">
<span class='linenumber'>113</span> </span><span class="WHIT">   </span><span class="COMM">//var i = http_request_snap.responseText.indexOf('&lt;') ;</span><span class="WHIT">
<span class='linenumber'>114</span> </span><span class="WHIT">   </span><span class="COMM">//return http_request_snap.responseText.substr( i);</span><span class="WHIT">
<span class='linenumber'>115</span> </span><span class="WHIT">   </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>116</span> 
<span class='linenumber'>117</span> </span><span class="WHIT">   </span><span class="NAME">this.postRequest</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">url</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">strData</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bCallAsync</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'>118</span> </span><span class="WHIT">   </span><span class="PUNC">{</span><span class="WHIT">		</span><span class="WHIT">
<span class='linenumber'>119</span> </span><span class="WHIT">  </span><span class="WHIT">
<span class='linenumber'>120</span> </span><span class="WHIT">     </span><span class="COMM">// Vorbereiten eines asynchronen POST-Requests</span><span class="WHIT">
<span class='linenumber'>121</span> </span><span class="WHIT">     </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xmlhttp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">XMLHttpRequest</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>122</span> </span><span class="WHIT">     </span><span class="NAME">xmlhttp.open</span><span class="PUNC">(</span><span class="STRN">"POST"</span><span class="PUNC">,</span><span class="WHIT">
<span class='linenumber'>123</span> </span><span class="WHIT">                  </span><span class="NAME">url</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>124</span> </span><span class="WHIT">      </span><span class="NAME">xmlhttp.setRequestHeader</span><span class="PUNC">(</span><span class="STRN">"Content-Type"</span><span class="PUNC">,</span><span class="WHIT">
<span class='linenumber'>125</span> </span><span class="WHIT">                              </span><span class="STRN">"application/x-www-form-urlencoded"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>126</span> </span><span class="WHIT">     </span><span class="NAME">xmlhttp.send</span><span class="PUNC">(</span><span class="NAME">strData</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>127</span> 
<span class='linenumber'>128</span> </span><span class="WHIT">   </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>129</span> 
<span class='linenumber'>130</span> 
<span class='linenumber'>131</span> </span><span class="NAME">NS2112.snapInLoader</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">  </span><span class="COMM">//</span><span class="WHIT">
<span class='linenumber'>132</span> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'>133</span> </span><span class="WHIT">   </span><span class="NAME">NS2112.snapInLoaderGlobals.URI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'/2112PowerWindows/php/loadSnap.php?'</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">         </span><span class="WHIT">
<span class='linenumber'>134</span> </span><span class="WHIT">   </span><span class="NAME">this.loadSnap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">rSnapIns</span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'>135</span> </span><span class="WHIT">   </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'>136</span> </span><span class="WHIT">      </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">rSnapIns.slice</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">  </span><span class="COMM">//make snap-shot      </span><span class="WHIT">
<span class='linenumber'>137</span> </span><span class="WHIT">      </span><span class="COMM">//alert('loadSnap: ' + NS2112.snapInLoaderGlobals.rSnapIns.length) ;</span><span class="WHIT">
<span class='linenumber'>138</span> </span><span class="WHIT">      </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'>139</span> </span><span class="WHIT">      </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'>140</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">uri</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.URI</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'SNAPINURL='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">URL</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>141</span> </span><span class="WHIT">         </span><span class="NAME">NS2112.snapInLoaderGlobals.rSnapIns.splice</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>142</span> </span><span class="COMM">//the value for Async call is set to false</span><span class="WHIT">
<span class='linenumber'>143</span> </span><span class="COMM">//This is just for testing because there were some problems - it should be changed back to true</span><span class="WHIT">
<span class='linenumber'>144</span> </span><span class="WHIT">         </span><span class="NAME">NS2112.snapInLoaderGlobals.makeRequest</span><span class="PUNC">(</span><span class="NAME">uri</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.myXHRCallback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">       </span><span class="WHIT">
<span class='linenumber'>145</span> </span><span class="WHIT">         </span><span class="COMM">/*
<span class='linenumber'>146</span>          var strResponse = NS2112.snapInLoaderGlobals.makeRequest(uri, false, NS2112.snapInLoaderGlobals.myXHRCallback) ;       
<span class='linenumber'>147</span>          eval(strResponse) ;                  
<span class='linenumber'>148</span>          if( NS2112.snapInLoaderGlobals.rSnapIns.length > 0 )
<span class='linenumber'>149</span>              this.loadSnap(NS2112.snapInLoaderGlobals.rSnapIns) ;        
<span class='linenumber'>150</span>          */</span><span class="WHIT">
<span class='linenumber'>151</span> </span><span class="WHIT">      </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'>152</span> </span><span class="WHIT">   </span><span class="PUNC">}</span><span class="WHIT">   </span><span class="WHIT">
<span class='linenumber'>153</span> </span><span class="COMM">/*
<span class='linenumber'>154</span> Loading a YAHOO Module
<span class='linenumber'>155</span> */</span><span class="WHIT">
<span class='linenumber'>156</span> </span><span class="WHIT">   </span><span class="NAME">this.loadModule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">strModuleName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bEval</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bCallAsync</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bLoadMin</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bLoadBeta</span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'>157</span> </span><span class="WHIT">   </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">//we get the path from our configuration.</span><span class="WHIT">
<span class='linenumber'>158</span> </span><span class="WHIT">         </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">NS2112.aPortalSettings</span><span class="PUNC">[</span><span class="STRN">'YUI_PATH'</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'>159</span> </span><span class="WHIT">         </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'>160</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">uri</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.URI</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'MODULE='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">NS2112.aPortalSettings</span><span class="PUNC">[</span><span class="STRN">'YUI_PATH'</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'/'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">strModuleName</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'>161</span> </span><span class="WHIT">                  </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'/'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">strModuleName</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>162</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">bLoadBeta</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">uri</span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'-beta'</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>163</span> </span><span class="WHIT">            </span><span class="NAME">bLoadMin</span><span class="PUNC">==</span><span class="KEYW">true</span><span class="PUNC">?</span><span class="NAME">uri</span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'-min.js'</span><span class="PUNC">:</span><span class="NAME">uri</span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'.js'</span><span class="WHIT">  </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>164</span> </span><span class="WHIT">         </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'>165</span> </span><span class="WHIT">         </span><span class="KEYW">else</span><span class="WHIT">
<span class='linenumber'>166</span> </span><span class="WHIT">         </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'>167</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>168</span> </span><span class="WHIT">         </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'>169</span> </span><span class="WHIT">         </span><span class="COMM">//usually modules must be called in sync to prevent syntax errors in snaps.</span><span class="WHIT">
<span class='linenumber'>170</span> </span><span class="WHIT">         </span><span class="WHIT">
<span class='linenumber'>171</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">response</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">  </span><span class="NAME">NS2112.snapInLoaderGlobals.makeRequest</span><span class="PUNC">(</span><span class="NAME">uri</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bCallAsync</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.myXHRCallback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>172</span> </span><span class="WHIT">         </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">bEval</span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'>173</span> </span><span class="WHIT">         </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'>174</span> </span><span class="WHIT">            </span><span class="NAME">eval</span><span class="PUNC">(</span><span class="NAME">response</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">            </span><span class="WHIT">
<span class='linenumber'>175</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>176</span> </span><span class="WHIT">         </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'>177</span> </span><span class="WHIT">         </span><span class="KEYW">else</span><span class="WHIT">
<span class='linenumber'>178</span> </span><span class="WHIT">          </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">response</span><span class="PUNC">;</span><span class="WHIT">        </span><span class="WHIT">
<span class='linenumber'>179</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'>180</span> 
<span class='linenumber'>181</span> </span><span class="WHIT">   </span><span class="NAME">this.loadModule2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">strURL</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bEval</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bCallAsync</span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'>182</span> </span><span class="WHIT">   </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">//we get the path from our configuration.</span><span class="WHIT">
<span class='linenumber'>183</span> </span><span class="WHIT">         </span><span class="WHIT">
<span class='linenumber'>184</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">uri</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.URI</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'MODULE='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">strURL</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">            </span><span class="WHIT">
<span class='linenumber'>185</span> </span><span class="WHIT">         </span><span class="WHIT">
<span class='linenumber'>186</span> </span><span class="WHIT">         </span><span class="COMM">//usually modules must be called in sync to prevent syntax errors in snaps.</span><span class="WHIT">
<span class='linenumber'>187</span> </span><span class="WHIT">   </span><span class="WHIT">
<span class='linenumber'>188</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">response</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">  </span><span class="NAME">NS2112.snapInLoaderGlobals.makeRequest</span><span class="PUNC">(</span><span class="NAME">uri</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bCallAsync</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">NS2112.snapInLoaderGlobals.myXHRCallback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>189</span> </span><span class="WHIT">     </span><span class="WHIT">
<span class='linenumber'>190</span> </span><span class="WHIT">         </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">bEval</span><span class="PUNC">)</span><span class="WHIT">
<span class='linenumber'>191</span> </span><span class="WHIT">         </span><span class="PUNC">{</span><span class="WHIT">
<span class='linenumber'>192</span> </span><span class="WHIT">            </span><span class="NAME">eval</span><span class="PUNC">(</span><span class="NAME">response</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">   </span><span class="WHIT">
<span class='linenumber'>193</span> </span><span class="WHIT">            </span><span class="NAME">include</span><span class="PUNC">(</span><span class="NAME">strURL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">         </span><span class="WHIT">
<span class='linenumber'>194</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>195</span> </span><span class="WHIT">         </span><span class="PUNC">}</span><span class="WHIT">
<span class='linenumber'>196</span> </span><span class="WHIT">         </span><span class="KEYW">else</span><span class="WHIT">     </span><span class="WHIT">
<span class='linenumber'>197</span> </span><span class="WHIT">          </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">response</span><span class="PUNC">;</span><span class="WHIT">        </span><span class="WHIT">
<span class='linenumber'>198</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="WHIT">
<span class='linenumber'>199</span> 
<span class='linenumber'>200</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='linenumber'>201</span> 
<span class='linenumber'>202</span> 
<span class='linenumber'>203</span> 
<span class='linenumber'>204</span> 
<span class='linenumber'>205</span> 
<span class='linenumber'>206</span> 
<span class='linenumber'>207</span> 
<span class='linenumber'>208</span> 
<span class='linenumber'>209</span> 
<span class='linenumber'>210</span> 
<span class='linenumber'>211</span> 
<span class='linenumber'>212</span> 
<span class='linenumber'>213</span> 
<span class='linenumber'>214</span> 
<span class='linenumber'>215</span> </span></pre></body></html>